package com.haidechizi;

import java.util.LinkedHashMap;
import java.util.Map;

public class LRU extends LinkedHashMap {

    private int size;

    public LRU(int size) {
        this.size = size;
    }

    @Override
    protected boolean removeEldestEntry(Map.Entry eldest) {
        return size() > size;
    }
}
